using System;
using System.Collections.Generic;
using System.Text;

using Liberty.Application.ApplicationManagement;
using Liberty.Domain.ApplicationManagement;
using Liberty.Persistence.Kernel;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Rhino.Mocks;

namespace Tests.ApplicationTests.ApplicantionManagement
{

#if DEBUG
    [TestClass()]
    public class ApplicantControllerTests : Object
    {
        #region Constants
        private const long TEST_APPLICANT_ID = 10;
        #endregion

        #region SetUp and TearDown ApplicantControllerTests
        [TestInitialize()]
        public void SetUpApplicantControllerTests()
        {
        }

        [TestCleanup()]
        public void TearDownApplicantControllerTests()
        {
        }
        #endregion

        #region Test Methods
        [TestMethod()]
        public void TestApplicantWith()
        {
            MockRepository mocks = new MockRepository();

            Applicant testApplicant = new Applicant( TEST_APPLICANT_ID, null, String.Empty, String.Empty );
            PersonBroker mockedBroker = mocks.DynamicMock<PersonBroker>( String.Empty );

            ApplicantController applicantController = new ApplicantController();
            applicantController.PersonBroker = mockedBroker;

            Expect.On( mockedBroker ).Call( mockedBroker.ApplicantWith( TEST_APPLICANT_ID ) ).IgnoreArguments().Return( testApplicant );
            
            mocks.ReplayAll();

            Assert.AreEqual( testApplicant,
                applicantController.ApplicantWith( TEST_APPLICANT_ID ) );
            
            mocks.VerifyAll();
        }
        #endregion

        #region Support Methods
        #endregion

        #region Data Elements
        #endregion

    }
#endif

}
